{% extends "common/frame.html" %}
{% load string %}
{% load i18n %} 
  
{% block head %}
  <title>
    {{ user.get_name|escape }}
  </title>
  {% block description %}
  {% endblock %}  
{% endblock %}

{% block header %}
<div id="header">
  <div id="logo">
    <h1><a href="/">{{ config.site_title }}<sup></sup></a></h1>
    <h2>{{ config.site_description }}</h2>
  </div>  
  <div id="menu">
    <ul>
    <li class="active"><a href="{% url ytcommunity.forum.view.board.list %}">{% trans "Homepage" %}</a></li>
    <li><a href="{% url ytcommunity.forum.view.post.all %}">{% trans "All Posts" %}</a></li>
    <li>  
        {% if user.user %}
        <a href="{{ user.url }}">{% trans "Logout" %}</a>  
        {% if user.admin %}<a href="{% url ytcommunity.forum.view.board.add %}">{% trans "Admin" %}</a>{% endif %}
        {% else %}
        <a href="{{ user.url }}">{% trans "Login" %}</a>
        {% endif %}
    </li>
    </ul>
  </div>  
</div>
{% endblock %}

{% block page %}
<div id="page">
<div id="content">
    
    
    {% trans 'All posts on forum' %}:
    <div>
    {% for post in posts %}
    <a class="forum_link" href="{% url ytcommunity.forum.view.post.display post.key.id %}">{{ post.title|escape }}</a><br>
    {% endfor %}
    </div>
    
    {% trans 'All blogs' %}:
    <div>
    {% for post in blogs %}
    <a class="forum_link" href="{% url ytcommunity.blog.view.blog.display post.key.id %}">{{ post.title|escape }}</a><br>
    {% endfor %}
    </div>    
    
</div>
</div>
{% endblock %}
